package com.lichuang.dedao.curriculum.mapper;

import com.lichuang.dedao.curriculum.entity.Curriculum;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.swagger.models.auth.In;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 * 课程 Mapper 接口
 * </p>
 *
 * @author xiaosong
 * @since 2019-07-15
 */
@Repository
public interface CurriculumMapper extends BaseMapper<Curriculum> {

    /**
     * 根据id更改课程状态
     * @param id
     * @return
     */
    Integer updateCurriculumStatusById(@Param("id")Integer id, @Param("status")Integer status);

    /**
     * 根据时间获取课程
     * @return
     */
    List<Curriculum> getNewestCurriculum();

}
